import { instance } from "@/services/jy-api/api"
import { useEffect, useState } from "react"

/*
 * @Author: jiayu
 * @Date: 2022-10-08 10:20:17
 * @LastEditors: jiayu
 * @LastEditTime: 2023-07-31 11:05:39
 * @Description: 
 */
const Index = () => {
  const [num, setNum] = useState('')
  const getHomeData = () => {
    instance('/index/Screen/getPart', {
    }).then(data => {
      console.log(data.data)
      setNum(data.data.login_log)
    })
  }
  useEffect(() => {
    getHomeData()
  }, [])
  return <div style={{marginRight: 20}}>  当前在线人数： {num}  </div>
}

export default Index